function updateVars(ID)
{	
	var shipID 	= ID;
	$('#shipID').val(shipID);
	$('#img').attr('src', $('#img').data('src')+shipID+'.gif');
	$('#darkmatter').text(NumberGetHumanReadable(CostInfo[shipID][2]));
	$('#traderHead').text(CostInfo[shipID][1]);
	$('#batn').show();
	Reset();
}

function Total()
{
	var Count	= $('#count').val();
	
	if(isNaN(Count) || Count < 0) {
		$('#count').val(0);
		Count = 0;
	}
	
	var shipID 	= $('#shipID').val();
	$('#total_darkmatter').text(NumberGetHumanReadable(CostInfo[shipID][2] * Count));
}

function Reset()
{
	$('#count').val(0);
	$('#total_darkmatter').text(0);
}
$(document).ready(function() {
	updateVars();
});